package com.pks.datacenter.entity.basic;

import lombok.Data;
import lombok.EqualsAndHashCode;

import com.pks.util.coder.database.DBField;
import com.pks.util.coder.database.DBQuery;
import com.pks.util.coder.database.DBTable;
import com.pks.web.mybatis.entity.BasicEntity;

/**8
 * 
 * @author pks
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@DBTable(tags = "任务执行日志信息", pri_increment = true )
public class JobLog extends BasicEntity {

	
	private static final long serialVersionUID = -8395169839869970046L;
	
	public static final int STATE_SUCCESS = 1;
	public static final int STATE_FAIL = 0;

	@DBField(comment = "任务ID")
	@DBQuery
	private Long jobId;
	
	@DBField(comment = "任务名称")
	@DBQuery(value = {"=" , "like"})
	private String jobName;
	
	@DBField(comment = "执行结果")
	private Integer state;
	
	@DBField(comment = "描述")
	private String content;
	
	@Override
	public void insertBefore() {
		super.insertBefore();
	}

	public JobLog(Long jobId, String jobName, Integer state, String content) {
		super();
		this.jobId = jobId;
		this.jobName = jobName;
		this.state = state;
		this.content = content;
	}

	
}
